//
//  SCNetRequest.h
//  SCFoundationKit
//
//  Created by Chao Sheng on 2023/10/16.
//

#import <Foundation/Foundation.h>

typedef enum {
    SCNetRequestHttpMethod_GET = 0,
    SCNetRequestHttpMethod_POST
} SCNetRequestHttpMethod;

NS_ASSUME_NONNULL_BEGIN

@interface SCNetRequest : NSObject

+ (SCNetRequest *)share;
/// 超时设置
- (SCNetRequest *(^)(NSTimeInterval))timeoutinterval;
/// 接口
- (SCNetRequest *(^)(NSString *))url;
/// 请求方式
- (SCNetRequest *(^)(SCNetRequestHttpMethod))method;
/// 入参
- (SCNetRequest *(^)(NSDictionary *))param;
/// 请求响应后解析出来成功，请求码
- (SCNetRequest *(^)(NSInteger code))successCode;
/// 发送请求
- (void)startRequestWithResponse:(void (^)(id response,NSError *error))responseBlock;

@end

NS_ASSUME_NONNULL_END
